//
//  DataType.h
//  rmipclient
//
//  Created by bob on 16/1/5.
//  Copyright © 2016年 bob. All rights reserved.
//

#import <Foundation/Foundation.h>


///缺省认证账户
#define DEFAULT_USERNAME    @"guest"
///缺省认证密码
#define DEFAULT_PASSWORD    @"guest"

///记录类型
typedef NS_ENUM(NSInteger, DataType){
    JSON_NO     = 0,    //!<无记录.
    JSON_ITEMS  = 1,    //!<多记录.
    JSON_ITEM   = 2     //!<单记录.
};

///记录类型
typedef NS_ENUM(NSInteger, AuthModel){
    AUTH_DEFAULT= 0,    //!<缺省认证.
    AUTH_LOGIN  = 1,    //!<登录认证.
    AUTH_D3     = 2     //!<第三方认证,保留.
};


#define SUCC                        @"200"

///请求格式无效
#define C302_REQ_format_unvalid     @"302"
///请求格式无效
#define C303_RES_format_unvalid     @"303"

///网络连接错误
#define C501_IO_connect_err         @"501"
///发送数据错误
#define C502_IO_send_err            @"502"
///接收数据错误
#define C503_IO_recv_err            @"503"

#pragma mark - HTTP头标记定义
#define HTTP_TAG_ContentType        @"ContentType"
#define HTTP_TAG_UserAgent          @"User-Agent"
#define HTTP_TAG_Authorization      @"Authorization"
#define HTTP_TAG_Basic              @"Basic"
#define HTTP_TAG_DeviceID           @"IMEI"
#define HTTP_TAG_Size               @"Size"
#define HTTP_TAG_Token              @"DeviceToken"
#define HTTP_TAG_FUNC               @"func"
#define HTTP_TAG_XForwardedFor      @"X-Forwarded-For"
#define HTTP_TAG_ContentEncoding    @"Content-Encoding"
#define HTTP_TAG_TransferEncoding   @"Transfer-Encoding"
#define HTTP_TAG_Header             @"header"

#define CMD_BASECFG                 @"app_basecfg"
#define CMD_DEVICE_CATCH            @"app_device_catch"
#define CMD_SMS_VALIDCODE           @"app_user_getvalidcode"


